/*
 * Copyright (c) 2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License")
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef SECURE_ELEMENT_READER_H
#define SECURE_ELEMENT_READER_H
#include "cj_common_ffi.h"
#include "native/ffi_remote_data.h"
#include "secure_element_ffi.h"
#include "reader.h"

namespace OHOS {
namespace SE {
namespace OMAPI {
class SEReaderImpl : public OHOS::FFI::FFIData {
    DECL_TYPE(SEReaderImpl, OHOS::FFI::FFIData)
public:
    SEReaderImpl() = default;
    ~SEReaderImpl() = default;

    void SetReader(std::shared_ptr<Reader> rd);

    std::string GetName(int32_t *errorCode);

    bool IsSecureElementPresent(int32_t *errorCode);

    int64_t OpenSession(int32_t *errorCode);

    void CloseSessions(int32_t *errorCode);

private:
    std::shared_ptr<Reader> reader_{};
};
}  // namespace OMAPI
}  // namespace SE
}  // namespace OHOS
#endif
